package cn.rengy.web.framework.wxmp.component.token;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.rengy.tpa.wxmp.exception.WeChatException;
import cn.rengy.web.framework.sql.DbService;
/**
 * 第三方平台的token的redis缓存实现
 * @author rengy
 *
 */
@ConditionalOnProperty(name = "spring.cache.type", havingValue = "simple", matchIfMissing = false)
@Service(value="componentTokenService")
public class SimpleComponentTokenService implements ComponentTokenService{
	
	
	/**
	 * 获取第三方平台的token
	 * @param component_appid
	 * @return
	 * @throws Exception 
	 */
	public String accessToken(String component_appid) throws WeChatException{
		return null;
	}
	
	/**
	 * 删除第三方平台的token缓存，token不可用时调用
	 * @param component_appid
	 */
	@Transactional()
	public void evictAccessToken(String component_appid,String value){
		
	}

	@Override
	public String preAuthCode(String component_appid) throws WeChatException {
		return null;
	}
	/**
	 * 授权方accessToken
	 */
	@Override
	public String authAccessToken(String appid) throws WeChatException {
		return null;
	}
	
	@Override
	public void evictAuthAccessToken(String appid, String value) {
		
	}

	@Override
	public String jsApiTicket(String appid) throws WeChatException {
		return null;
	}

	@Override
	public void evictJsApiTicket(String appid, String value) {
		
	}

}
